package com.qyhl.shop.shop.rush.detail;

import com.qyhl.webtv.commonlib.entity.shop.ShopRushDetailBean;
import com.qyhl.webtv.commonlib.entity.shop.ShopRushPurchaseTicketBean;

public class ShopRushPurchaseDetailPresenter implements ShopRushPurchaseDetailContract.ShopRushPurchaseDetailPresenter {
    private ShopRushPurchaseDetailContract.ShopRushPurchaseDetailView mView;
    private ShopRushPurchaseDetailModel mModel;

    public ShopRushPurchaseDetailPresenter(ShopRushPurchaseDetailContract.ShopRushPurchaseDetailView mView) {
        this.mView = mView;
        this.mModel = new ShopRushPurchaseDetailModel(this);
    }

    @Override
    public void getDetail(int giftId) {
        mModel.getDetail(giftId);
    }

    @Override
    public void doRushPurchase(int giftId, String phoneNum, String sign) {
        mModel.doRushPurchase(giftId, phoneNum, sign);
    }

    @Override
    public void setDetail(ShopRushDetailBean bean) {
        mView.setDetail(bean);
    }

    @Override
    public void rushPurchaseResult(ShopRushPurchaseTicketBean bean) {
        mView.rushPurchaseResult(bean);
    }

    @Override
    public void setError(String msg) {
        mView.setError(msg);
    }

    @Override
    public void rushPurchaseError(int code,String msg) {
        mView.rushPurchaseError(code,msg);
    }
}
